// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v4.25.1
// source: gstacks/proto/v1/gstacks.proto

package v1

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// GoroutineStacksClient is the client API for GoroutineStacks service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type GoroutineStacksClient interface {
	Invoke(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

type goroutineStacksClient struct {
	cc grpc.ClientConnInterface
}

func NewGoroutineStacksClient(cc grpc.ClientConnInterface) GoroutineStacksClient {
	return &goroutineStacksClient{cc}
}

func (c *goroutineStacksClient) Invoke(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
	out := new(Response)
	err := c.cc.Invoke(ctx, "/gstacks.GoroutineStacks/Invoke", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// GoroutineStacksServer is the server API for GoroutineStacks service.
// All implementations must embed UnimplementedGoroutineStacksServer
// for forward compatibility
type GoroutineStacksServer interface {
	Invoke(context.Context, *Request) (*Response, error)
	mustEmbedUnimplementedGoroutineStacksServer()
}

// UnimplementedGoroutineStacksServer must be embedded to have forward compatible implementations.
type UnimplementedGoroutineStacksServer struct {
}

func (UnimplementedGoroutineStacksServer) Invoke(context.Context, *Request) (*Response, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
}
func (UnimplementedGoroutineStacksServer) mustEmbedUnimplementedGoroutineStacksServer() {}

// UnsafeGoroutineStacksServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GoroutineStacksServer will
// result in compilation errors.
type UnsafeGoroutineStacksServer interface {
	mustEmbedUnimplementedGoroutineStacksServer()
}

func RegisterGoroutineStacksServer(s grpc.ServiceRegistrar, srv GoroutineStacksServer) {
	s.RegisterService(&GoroutineStacks_ServiceDesc, srv)
}

func _GoroutineStacks_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Request)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GoroutineStacksServer).Invoke(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/gstacks.GoroutineStacks/Invoke",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GoroutineStacksServer).Invoke(ctx, req.(*Request))
	}
	return interceptor(ctx, in, info, handler)
}

// GoroutineStacks_ServiceDesc is the grpc.ServiceDesc for GoroutineStacks service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GoroutineStacks_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gstacks.GoroutineStacks",
	HandlerType: (*GoroutineStacksServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Invoke",
			Handler:    _GoroutineStacks_Invoke_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gstacks/proto/v1/gstacks.proto",
}
